package
{
	import flash.display.MovieClip;
	import flash.events.KeyboardEvent;
	import flash.events.MouseEvent;
	import flash.ui.Keyboard;
	
	/**
	 * ...
	 * @author Pedro Passos e CIA
	 */
	public class Intro extends MovieClip
	{
		var fundo:FundoIntro;
		
		var btnJogar:BtnJogar;
		var btnCredito:BtnCredito;
		var btnSair:BtnSair;
		
		public function Intro()
		{
			Main.CleanScreen();
			DrawScreen();
		}
		
		private function DrawScreen():void
		{
			fundo = new FundoIntro();
			fundo.x = Main.stage.stageWidth / 2;
			fundo.y = Main.stage.stageHeight / 2;
			Main.screen.addChild(fundo);
			
		/*	btnJogar = new BtnJogar();
			btnJogar.x = Main.stage.stageWidth / 2;
			btnJogar.y = 350;
			Main.screen.addChild(btnJogar);*/
			
			/*btnCredito = new BtnCredito();
			btnCredito.x = Main.stage.stageWidth / 2;
			btnCredito.y = 420;
			Main.screen.addChild(btnCredito);
			
			btnSair = new BtnSair();
			btnSair.x = Main.stage.stageWidth / 2;
			btnSair.y = 490;
			Main.screen.addChild(btnSair);*/
			
			Main.stage.addEventListener(KeyboardEvent.KEY_DOWN, PlayGame);
			
			/*btnCredito.addEventListener(MouseEvent.CLICK, ShowCredits);
			
			btnSair.addEventListener(MouseEvent.CLICK, ShowCredits);*/
		
		}
		
		private function PlayGame(e:KeyboardEvent):void
		{
			switch(e.keyCode) {
				case Keyboard.SPACE:
					var j : Jogo = new Jogo();
					Main.stage.removeEventListener(KeyboardEvent.KEY_DOWN, PlayGame);	
					break;
			}
			
		}
		
		private function ShowCredits(e:MouseEvent):void
		{
			var c:Credito = new Credito();
		}
	
	}

}